﻿module MinHeap
open Heap

type MinHeap(A:int32[],count:int32)=
    let  heapSize =ref count
    let  rec MinHeapify (arr:int [] , heapSize') i =
        let min (arr:int32[]) i j =
            if arr.[i]<arr.[j] then i
            else j
        Heapify (arr,heapSize' ) i min
    member h.Sort() =
        Sort (A,heapSize) MinHeapify

